<template>
  <div>
      <h2 style="margin-left: 450px;margin-top: 20px;">项目经历</h2>
  </div>
  <el-timeline style="margin-top: 20px;margin-left: 70px; width: 900px;">
  
    <el-timeline-item :timestamp="l.date" placement="top" v-for="(l,index) in paperData.list" :key="index">
  
      <el-card>
        <h4 v-text="l.projectname"></h4>
        <p v-text="l.descript"></p>
      </el-card>
    </el-timeline-item>
    
  </el-timeline>
</template>

<script setup>

import { ref } from "vue";
import API from "../pluging/axiosInstance.js";
import { useRoute } from 'vue-router'
import { reactive } from "vue";


const route = useRoute()
const name = route.query.name
const id = route.query.id
console.log("practice id:"+id)
function getData () {
 API({
  url: "/home/paper",
  method: "post",
  data: {
     id:id
  },
}).then((res) => {
  console.log(res.data)
  paperData.list=res.data.dataList
  console.log("请求成功!" + "请求数据：");
  console.log('项目名称：'+paperData.list[currentId].projectname );

  // console.log(loginData.id)
});
};

getData()

const paperData = reactive({
list:[{
  projectid:'',
  projectname:'',
  level: "",
  degree:'',
  descript: "",
  date:''
}]
});

const  currentId=0;














</script>